<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Pdf_creater {
	function pdf_create($html, $name, $crash = false) {
		require_once("mpdf51/mpdf.php");
		$mpdf = new mPDF('utf-8', 'A4', 9, '', 10, 10, 7, 7, 10, 10); /*задаем формат, отступы и.т.д.*/
		$mpdf->charset_in = 'utf-8'; /*не забываем про русский*/
		$mpdf->list_indent_first_level = 0;
		$mpdf->WriteHTML($html, 0); /*формируем pdf*/
		$mpdf->Output('./pdf/'.($crash==true?"crash/":"").$name.'.pdf', 'F');
	}
}
?>